<%--
  Created by IntelliJ IDEA.
  User: Hengfei Li
  Date: 2021/2/17
  Time: 16:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>顾客登录 - E速定餐</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
    <style>
        html,
        body {
            height: 100%;
        }

        body {
            display: flex;
            align-items: center;
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
        }

        .form-signin {
            width: 100%;
            max-width: 330px;
            padding: 15px;
            margin: auto;
        }
        .form-signin .checkbox {
            font-weight: 400;
        }
        .form-signin .form-control {
            position: relative;
            box-sizing: border-box;
            height: auto;
            padding: 10px;
            font-size: 16px;
        }
        .form-signin .form-control:focus {
            z-index: 2;
        }
        .form-signin input[type="text"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
            -webkit-user-select: none;
            -moz-user-select: none;
            user-select: none;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>
</head>
<body class="text-center">
    <main class="form-signin">
        <form action="${pageContext.request.contextPath }/customer-login-process" method="post">
            <img class="mb-4 rounded-circle" src="${pageContext.request.contextPath }/app/detail/style/images/food_delivery.jpg" alt=""
                 width="180" >
            <h1 class="h3 mb-3 fw-normal">请登录</h1>
            <c:if test="${sessionScope.containsKey('loginError')}">
            	<div class="text-danger mb-1">
            		<c:out value="${sessionScope.loginError}"></c:out>
            	</div>
            </c:if>
            <label for="inputUsername" class="visually-hidden">用户名：</label>
            <input type="text" id="inputUsername" name="username" class="form-control" placeholder="用户名" required autofocus>
            <label for="inputPassword" class="visually-hidden">密码：</label>
            <input type="password" id="inputPassword" name="password" class="form-control" placeholder="密码" required>
            <div class="checkbox mb-3">
<%--                <label>--%>
<%--                    <input type="checkbox" value="remember-me"> Remember me--%>
<%--                </label>--%>
            </div>
            <button class="w-100 btn btn-lg btn-primary" type="submit">登录</button>
            <p class="mt-5 mb-3 text-muted">&copy; 2021</p>
        </form>
    </main>
</body>
</html>
